package com.hyz.controller;

import com.hyz.pojo.ResponseResult;
import com.hyz.pojo.assetRetire.AssetRetireResponse;
import com.hyz.pojo.assetRetire.InsertAssetRetireRequest;
import com.hyz.service.RetireApplicantService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api("资产报废申请人员")
@RestController
@RequestMapping("/retireApplicant")
public class RetireApplicantController {

    @Autowired
    private RetireApplicantService service;

    @ApiOperation("创建资产报废申请")
    @ApiParam("资产报废申请请求")
    @ApiResponse(code = 200, message = "成功", response = ResponseResult.class)
    @PostMapping("/insertAssetRetire")
    public ResponseResult <List<AssetRetireResponse>> insertAssetRetire(@RequestBody InsertAssetRetireRequest request){
        return service.insertAssetRetire(request);
    }

}
